package com.yc.base;


import okhttp3.*;
import org.junit.Test;

import java.io.IOException;

public class test01 {


	@Test
	public void test() throws IOException {
		OkHttpClient client = new OkHttpClient().newBuilder()
				.build();
		MediaType mediaType = MediaType.parse("text/plain");
		RequestBody body = RequestBody.create(mediaType, "");
		Request request = new Request.Builder()
				.url("https://wap.yn.10086.cn/act/action.do?reqUrl=wedSeckill&method=secKilling&actCode=1402&roundId=R202106020106")
				.method("POST", body)
				.addHeader("Cookie", "TY_SESSION_ID=6d03fde4-4175-407c-8e71-b1ff63e23950; yn_cid=5b60ed863e5c438a87a1be19e9d1cf55; SESSIONTKEN=9ace8d4ad2df45d888d8c9d0b083ef9b_1017323208011; udata_account_300011882721=P8NCLAC7ZTJ7FfvI1kdXYBKgEvFOKbQk14dC0PhFktU%3D; userid_300011882721=1621425941148297759; codeUuid=35399C8B; udata_s_300011882721=1622023136893127427; SESSIONTKEN_WAP=045db02466da474180518ee359a5c606; cmtokenid=\"CB435789EF614208B69550DAA1F793A4@yn.10086.cn\"; ynhshtkid=\"CB435789EF614208B69550DAA1F793A4@yn.10086.cn\"; yncmcctokenid=\"CB435789EF614208B69550DAA1F793A4@yn.10086.cn\"; JSESSIONID=72818396875FFA93BB237B7ACE76D458; WT_FPC=id=289dc3db456e87392761621425974422:lv=1622635131564:ss=1622635124843; SESSIONTKEN=9ace8d4ad2df45d888d8c9d0b083ef9b_1017323208011; JSESSIONID=5B3DC37D87787F1F208BA175D5A509F9; yn_cid=5b60ed863e5c438a87a1be19e9d1cf55")
				.addHeader("X-Tingyun-Id", "p35OnrDoP8k;r=635313531")
				.build();
		Response response = client.newCall(request).execute();
		System.out.println(response.body().string());
	}
}
